package a.i;

import a.c.ab;
import a.c.bb;
import a.c.d;
import a.c.e;
import a.c.k;
import a.c.m;
import a.c.q;
import a.c.v;
import a.c.w;
import a.c.x;
import a.c.y;

import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;

public class z
{
  private q a;
  private List b;
  private List c;
  private boolean d = true;
  private k e;
  private Map g;
  private static final Object h = new Object();
  public static boolean i;
  
  public z(q paramq, k paramk)
  {
    this.a = paramq;
    this.b = new ArrayList(paramq.l());
    this.c = new ArrayList(paramq.j());
    a(paramk);
  }
  
  public void a(k paramk)
  {
    boolean bool2 = p.b;
    boolean bool1 = p.a;
    this.g = new HashMap();
    this.e = paramk;
    w localw = this.a.v();
    label182:
    label347:
    label348:
    label360:
    do
    {
      if (!localw.e()) {
        break;
      }
      e locale = localw.d();
      Object localObject1 = paramk.get(locale);
      if (!bool2) {}
      a_ locala_ = (a_)this.g.get(localObject1 == null ? h : localObject1);
      if (!bool2) {
        if (locala_ == null)
        {
          locala_ = new a_();
          if (!bool2) {}
          this.g.put(localObject1 == null ? h : localObject1, locala_);
        }
      }
      locala_.a.add(locale);
      d locald = locale.i();
      do
      {
        Object localObject2;
        do
        {
          do
          {
            if (locald == null) {
              break;
            }
            localObject2 = paramk.get(locald.e());
            if (bool1) {
              break label284;
            }
            if ((localObject2 != localObject1) && (((!bool2) && (localObject2 == null)) || ((bool2) || (!localObject2.equals(localObject1))))) {
              locala_.c.add(locald);
            }
            locald = locald.j();
          } while (!bool1);
        } while (bool2);
        locald = locale.h();
        do
        {
          if (locald == null) {
            break label360;
          }
          localObject2 = paramk.get(locald.f());
          if (bool2) {
            break label182;
          }
          if (bool1) {
            break;
          }
          if (localObject2 != localObject1)
          {
            if ((bool2) || (localObject2 != null))
            {
              if (bool2) {
                break label347;
              }
              if (!localObject2.equals(localObject1)) {}
            }
          }
          else
          {
            locala_.b.add(locald);
            if (bool2) {
              continue;
            }
            if (!bool1) {
              break label348;
            }
          }
          locala_.c.add(locald);
          locald = locald.i();
        } while (!bool1);
        localw.f();
      } while (bool2);
    } while (!bool1);
    label284:
  }
  
  public void a(Object paramObject)
  {
    boolean bool2 = p.b;
    boolean bool1 = p.a;
    if (!bool2) {}
    a_ locala_ = (a_)this.g.get(paramObject == null ? h : paramObject);
    if ((bool2) || (locala_ != null))
    {
      int j = locala_.a.size() - 1;
      do
      {
        if (j < 0) {
          break;
        }
        e locale = (e)locala_.a.get(j);
        a(locale);
        j--;
      } while (!bool1);
    }
  }
  
  public void b(Object paramObject)
  {
    boolean bool2 = p.b;
    boolean bool1 = p.a;
    if (!bool2) {}
    a_ locala_ = (a_)this.g.get(paramObject == null ? h : paramObject);
    if ((bool2) || (locala_ != null))
    {
      int j = locala_.a.size() - 1;
      Object localObject;
      do
      {
        if (j < 0) {
          break;
        }
        localObject = (e)locala_.a.get(j);
        if (bool1) {
          break label126;
        }
        if (!this.a.h((e)localObject)) {
          b((e)localObject);
        }
        j--;
      } while (!bool1);
      if (!bool2)
      {
        label126:
        j = locala_.b.size() - 1;
        do
        {
          do
          {
            if (j < 0) {
              break;
            }
            localObject = (d)locala_.b.get(j);
            if (bool1) {
              break label193;
            }
            if (!this.a.j((d)localObject)) {
              b((d)localObject);
            }
            j--;
          } while (!bool1);
        } while (bool2);
      }
      label193:
      j = locala_.c.size() - 1;
      do
      {
        if (j < 0) {
          break;
        }
        localObject = (d)locala_.c.get(j);
        if (!bool2)
        {
          if (this.a.h(((d)localObject).e()))
          {
            if (bool2) {
              continue;
            }
            if (this.a.h(((d)localObject).f()))
            {
              if (bool2) {
                continue;
              }
              if (!this.a.j((d)localObject)) {
                b((d)localObject);
              }
            }
          }
          j--;
        }
      } while (!bool1);
    }
  }
  
  public void c(Object paramObject)
  {
    boolean bool2 = p.b;
    boolean bool1 = p.a;
    Object localObject1 = this.a.v();
    Object localObject2;
    do
    {
      if (!((w)localObject1).e()) {
        break;
      }
      e locale = ((w)localObject1).d();
      localObject2 = this.e.get(locale);
      if (bool1) {
        break label126;
      }
      if (localObject2 != paramObject) {
        if ((bool2) || (paramObject != null))
        {
          if (bool2) {
            continue;
          }
          if (paramObject.equals(localObject2)) {}
        }
        else
        {
          a(locale);
        }
      }
      ((w)localObject1).f();
    } while (!bool1);
    if (!bool2) {
      if (bool2) {}
    }
    label126:
    localObject1 = (a_)this.g.get(paramObject == null ? h : paramObject);
    if ((bool2) || (localObject1 != null))
    {
      int j = ((a_)localObject1).a.size() - 1;
      do
      {
        do
        {
          if (j < 0) {
            break;
          }
          localObject2 = (e)((a_)localObject1).a.get(j);
          if (bool1) {
            break label217;
          }
          if (!this.a.h((e)localObject2)) {
            b((e)localObject2);
          }
          j--;
        } while (!bool1);
      } while (bool2);
      label217:
      j = ((a_)localObject1).b.size() - 1;
      do
      {
        if (j < 0) {
          break;
        }
        localObject2 = (d)((a_)localObject1).b.get(j);
        if (!bool2)
        {
          if (!this.a.j((d)localObject2)) {
            b((d)localObject2);
          }
          j--;
        }
      } while (!bool1);
    }
  }
  
  public void a(boolean paramBoolean)
  {
    if (!p.b) {}
    this.d = (!paramBoolean);
  }
  
  public boolean a()
  {
    if (!p.b) {}
    return !this.d;
  }
  
  public void b()
  {
    boolean bool2 = p.b;
    boolean bool1 = p.a;
    do
    {
      w localw = this.a.v();
      while (!bool1)
      {
        if (!localw.e()) {
          break;
        }
        a(localw.d());
        localw.f();
      }
    } while (bool2);
  }
  
  public void c()
  {
    boolean bool2 = p.b;
    boolean bool1 = p.a;
    do
    {
      m localm = this.a.w();
      while (!bool1)
      {
        if (!localm.e()) {
          break;
        }
        a(localm.a());
        localm.f();
      }
    } while (bool2);
  }
  
  public void d()
  {
    boolean bool2 = p.b;
    boolean bool1 = p.a;
    do
    {
      m localm = this.a.w();
      while (!bool1)
      {
        if (!localm.e()) {
          break;
        }
        if (!bool2)
        {
          if (localm.a().g()) {
            a(localm.a());
          }
          localm.f();
        }
      }
    } while (bool2);
  }
  
  public void e()
  {
    d();
    f();
  }
  
  public void f()
  {
    boolean bool2 = p.b;
    boolean bool1 = p.a;
    x localx = this.a.B();
    w localw = this.a.v();
    label188:
    label210:
    label236:
    label238:
    do
    {
      do
      {
        if (!localw.e()) {
          break label241;
        }
        e locale1 = localw.d();
        if (bool1) {
          return;
        }
        m localm = locale1.l();
        d locald1;
        e locale2;
        do
        {
          do
          {
            if (!localm.e()) {
              break;
            }
            locald1 = localm.a();
            locale2 = locald1.a(locale1);
            d locald2 = (d)localx.get(locale2);
            if (bool2) {
              break label210;
            }
            if (bool1) {
              break label188;
            }
            if (locald2 != locald1) {
              if (locald2 == null)
              {
                localx.a(locale2, locald1);
                if (bool2) {
                  continue;
                }
                if (!bool1) {}
              }
              else
              {
                a(locald1);
              }
            }
            localm.f();
          } while (!bool1);
        } while (bool2);
        localm = locale1.l();
        do
        {
          if (!localm.e()) {
            break;
          }
          locald1 = localm.a();
          locale2 = locald1.a(locale1);
          localx.a(locale2, null);
          localm.f();
          if (bool2) {
            break label238;
          }
          if (bool1) {
            break label236;
          }
        } while (!bool1);
      } while (bool2);
      localw.f();
    } while (!bool1);
    label241:
    if (!bool2) {
      this.a.a(localx);
    }
  }
  
  public void g()
  {
    h();
    i();
  }
  
  public void h()
  {
    boolean bool2 = p.b;
    boolean bool1 = p.a;
    int j = this.c.size() - 1;
    do
    {
      if (j < 0) {
        break;
      }
      e locale = (e)this.c.get(j);
      if (bool2) {
        return;
      }
      if (bool1) {
        break label82;
      }
      if (!bool2)
      {
        if (!this.a.h(locale)) {
          b(locale);
        }
        j--;
      }
    } while (!bool1);
    if (!bool2) {
      label82:
      this.c.clear();
    }
  }
  
  public void i()
  {
    boolean bool2 = p.b;
    boolean bool1 = p.a;
    int j = this.b.size() - 1;
    do
    {
      if (j < 0) {
        break;
      }
      d locald = (d)this.b.get(j);
      if (bool2) {
        return;
      }
      if (bool1) {
        break label82;
      }
      if (!bool2)
      {
        if (!this.a.j(locald)) {
          b(locald);
        }
        j--;
      }
    } while (!bool1);
    if (!bool2) {
      label82:
      this.b.clear();
    }
  }
  
  public void a(e parame)
  {
    boolean bool2 = p.b;
    boolean bool1 = p.a;
    if (!this.a.h(parame)) {
      return;
    }
    d locald1 = parame.i();
    d locald2;
    label89:
    label92:
    do
    {
      do
      {
        do
        {
          if (locald1 == null) {
            break label92;
          }
          locald2 = locald1;
          locald1 = locald1.j();
          this.b.add(locald2);
          if (bool1) {
            break label187;
          }
          if (!this.d) {
            break;
          }
          this.a.f(locald2);
          if (bool2) {
            break label89;
          }
        } while (!bool1);
        this.a.a(locald2);
      } while (!bool1);
    } while (bool2);
    locald1 = parame.h();
    label164:
    do
    {
      do
      {
        if (locald1 == null) {
          break label167;
        }
        locald2 = locald1;
        locald1 = locald1.i();
        this.b.add(locald2);
        if (bool1) {
          break label187;
        }
        if (!this.d) {
          break;
        }
        this.a.f(locald2);
        if (bool2) {
          break label164;
        }
      } while (!bool1);
      this.a.a(locald2);
    } while (!bool1);
    label167:
    this.c.add(parame);
    if (!bool2) {
      if (this.d)
      {
        label187:
        if (bool2) {
          break label213;
        }
        this.a.d(parame);
        if (!bool1) {
          return;
        }
      }
    }
    label213:
    this.a.a(parame);
  }
  
  public void a(d paramd)
  {
    boolean bool = p.b;
    if (!bool)
    {
      if (this.a.j(paramd)) {
        return;
      }
      this.b.add(paramd);
      if (bool) {}
    }
    else if (this.d)
    {
      if (bool) {
        break label65;
      }
      this.a.f(paramd);
      if (!p.a) {
        return;
      }
    }
    label65:
    this.a.a(paramd);
  }
  
  public void a(ab paramab)
  {
    boolean bool2 = p.b;
    boolean bool1 = p.a;
    do
    {
      for (v localv = paramab.f(); !bool1; localv = localv.a())
      {
        if (localv == null) {
          break;
        }
        a((d)localv.c());
      }
    } while (bool2);
  }
  
  public void a(bb parambb)
  {
    boolean bool2 = p.b;
    boolean bool1 = p.a;
    do
    {
      for (v localv = parambb.f(); !bool1; localv = localv.a())
      {
        if (localv == null) {
          break;
        }
        a((e)localv.c());
      }
    } while (bool2);
  }
  
  public void a(m paramm)
  {
    boolean bool2 = p.b;
    do
    {
      boolean bool1 = p.a;
      while (!bool1)
      {
        if (!paramm.e()) {
          break;
        }
        a(paramm.a());
        paramm.f();
      }
    } while (bool2);
  }
  
  public void a(w paramw)
  {
    boolean bool2 = p.b;
    do
    {
      boolean bool1 = p.a;
      while (!bool1)
      {
        if (!paramw.e()) {
          break;
        }
        a(paramw.d());
        paramw.f();
      }
    } while (bool2);
  }
  
  public void a(y paramy)
  {
    boolean bool2 = p.b;
    boolean bool1 = p.a;
    label93:
    do
    {
      if (!paramy.e()) {
        break;
      }
      Object localObject = paramy.j();
      if (!bool2) {
        if ((localObject instanceof e))
        {
          a((e)localObject);
          if (bool2) {
            continue;
          }
          if (!bool1) {
            break label93;
          }
        }
      }
      if (!bool2)
      {
        if ((localObject instanceof d)) {
          a((d)localObject);
        }
      }
      else
      {
        if (bool2) {
          continue;
        }
        if (!bool1) {
          break label93;
        }
      }
      throw new ClassCastException("Node or Edge expected");
      paramy.f();
    } while (!bool1);
  }
  
  public q j()
  {
    return this.a;
  }
  
  protected void b(d paramd)
  {
    boolean bool = p.b;
    if (!bool) {
      if (this.d)
      {
        if (bool) {
          break label38;
        }
        this.a.g(paramd);
        if (!p.a) {
          return;
        }
      }
    }
    label38:
    this.a.d(paramd);
  }
  
  protected void b(e parame)
  {
    boolean bool = p.b;
    if (!bool) {
      if (this.d)
      {
        if (bool) {
          break label38;
        }
        this.a.e(parame);
        if (!p.a) {
          return;
        }
      }
    }
    label38:
    this.a.c(parame);
  }
  
  static final class a_
  {
    List a = new ArrayList(32);
    List b = new ArrayList(32);
    List c = new ArrayList(16);
  }
}



/* Location:           E:\idea\

 * Qualified Name:     a.i.z

 * JD-Core Version:    0.7.0.1

 */